package com.kly.chatter.api.application.controller.sys.req;


import com.fqgj.common.api.ParamsObject;
import com.fqgj.common.utils.CollectionUtils;
import com.kly.sc.api.infras.exception.ApplicationException;

import java.util.List;

public class MessageReadRequest extends ParamsObject {

    private List<String> readMessages;

    public List<String> getReadMessages() {
        return readMessages;
    }

    public void setReadMessages(List<String> readMessages) {
        this.readMessages = readMessages;
    }

    @Override
    public void validate() {
        if (CollectionUtils.isEmpty(this.readMessages)) {
            throw new ApplicationException("The params [readMessages] should not be empty");
        }
    }
}